export function fetchUser(id) {
    return new Promise((resolve, reject) => {
      setTimeout(() => {
          if(Math.random()>0.5){
            reject({ msg: '获取数据失败' });
          }
          resolve({ id, name: `姓名${id}` });
      }, 1000 * Number(id));
    });
  }